package cc.comac.mom.service.impl;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import cc.comac.mom.api.QualityQarCheckInvoiceService;
import cc.comac.mom.bean.QualityQarCheckInvoice;
import cc.comac.mom.bean.QualityQarSplitBean;
import cc.comac.mom.datahandlers.entity.QualityQarCheckInvoiceDataHandler;
import cc.comac.mom.util.ResultBean;
import cc.comac.mom.webservice.QualityQarProblemFormExternalService;
/**
 * qar检验表单
* @ClassName: QualityQarCheckInvoiceServiceImpl  
* @Description: TODO  
* @author FYT  
* @date 2020年8月19日 上午10:01:30  
*
 */
@Service
@RestController
public class QualityQarCheckInvoiceServiceImpl implements QualityQarCheckInvoiceService {

	@Autowired
	private QualityQarCheckInvoiceDataHandler qualityQarCheckInvoiceDataHandler;
	
	@Autowired
	private QualityQarProblemFormExternalService qualityQarProblemFormExternalService;
	
	@Override
	public ResultBean qarIssue(@RequestBody QualityQarCheckInvoice obj) {
		// TODO Auto-generated method stub
		return qualityQarCheckInvoiceDataHandler.qarIssue(obj);
	}

	@Override
	public ResultBean beginCheck(@RequestBody QualityQarCheckInvoice obj) {
		// TODO Auto-generated method stub
		return qualityQarCheckInvoiceDataHandler.beginCheck(obj);
	}

	@Override
	public ResultBean qarReject(@RequestBody QualityQarCheckInvoice obj) {
		// TODO Auto-generated method stub
		return qualityQarCheckInvoiceDataHandler.qarReject(obj);
	}

	@Override
	public ResultBean qarDisabled(@RequestBody QualityQarCheckInvoice obj) {
		// TODO Auto-generated method stub
		return qualityQarCheckInvoiceDataHandler.qarDisabled(obj);
	}

	@Override
	public ResultBean qarEntrust(@RequestBody QualityQarCheckInvoice obj) {
		// TODO Auto-generated method stub
		return qualityQarCheckInvoiceDataHandler.qarEntrust(obj);
	}

	@Override
	public ResultBean qarAudit(@RequestBody QualityQarCheckInvoice obj) {
		// TODO Auto-generated method stub
		return qualityQarCheckInvoiceDataHandler.qarAudit(obj);
	}

	@Override
	public ResultBean qarToFile(@RequestBody QualityQarCheckInvoice obj) {
		// TODO Auto-generated method stub
		return qualityQarCheckInvoiceDataHandler.qarToFile(obj);
	}

	@Override
	public ResultBean update(@RequestBody QualityQarCheckInvoice obj) {
		// TODO Auto-generated method stub
		return qualityQarCheckInvoiceDataHandler.update(obj);
	}

	@Override
	public ResultBean qarSplit(@RequestBody QualityQarSplitBean obj) {
		return qualityQarCheckInvoiceDataHandler.qarSplit(obj);
	}

	@Override
	public ResultBean getByQarNo(@RequestParam String qarNo) {
		ResultBean resultBean = new ResultBean(true);
		QualityQarCheckInvoice checkInvoice = qualityQarCheckInvoiceDataHandler.getByQarNo(qarNo);
		resultBean.setObject(checkInvoice);
		return resultBean;
	}

	@Override
	public ResultBean insertQarProblemForm(@RequestBody QualityQarCheckInvoice qualityQarCheckInvoice) {
		ResultBean resultBean = new ResultBean(true);
		 qualityQarProblemFormExternalService.insertProblemForm(qualityQarCheckInvoice.getInnerData());
		return resultBean;
	}

}
